Integrand size = 21, antiderivative size = 110 \[ \int \frac {\cos ^2(c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {7 x}{2 a^2}-\frac {16 \sin (c+d x)}{3 a^2 d}+\frac {7 \cos (c+d x) \sin (c+d x)}{2 a^2 d}-\frac {8 \cos (c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {\cos (c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2} \]
7/2*x/a^2-16/3*sin(d*x+c)/a^2/d+7/2*cos(d*x+c)*sin(d*x+c)/a^2/d-8/3*cos(d* x+c)*sin(d*x+c)/a^2/d/(1+sec(d*x+c))-1/3*cos(d*x+c)*sin(d*x+c)/d/(a+a*sec( d*x+c))^2
Time = 1.57 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.61 \[ \int \frac {\cos ^2(c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {\sec \left (\frac {c}{2}\right ) \sec ^3\left (\frac {1}{2} (c+d x)\right ) \left (252 d x \cos \left (\frac {d x}{2}\right )+252 d x \cos \left (c+\frac {d x}{2}\right )+84 d x \cos \left (c+\frac {3 d x}{2}\right )+84 d x \cos \left (2 c+\frac {3 d x}{2}\right )-381 \sin \left (\frac {d x}{2}\right )+147 \sin \left (c+\frac {d x}{2}\right )-239 \sin \left (c+\frac {3 d x}{2}\right )-63 \sin \left (2 c+\frac {3 d x}{2}\right )-15 \sin \left (2 c+\frac {5 d x}{2}\right )-15 \sin \left (3 c+\frac {5 d x}{2}\right )+3 \sin \left (3 c+\frac {7 d x}{2}\right )+3 \sin \left (4 c+\frac {7 d x}{2}\right )\right )}{192 a^2 d} \]
(Sec[c/2]*Sec[(c + d*x)/2]^3*(252*d*x*Cos[(d*x)/2] + 252*d*x*Cos[c + (d*x) /2] + 84*d*x*Cos[c + (3*d*x)/2] + 84*d*x*Cos[2*c + (3*d*x)/2] - 381*Sin[(d *x)/2] + 147*Sin[c + (d*x)/2] - 239*Sin[c + (3*d*x)/2] - 63*Sin[2*c + (3*d *x)/2] - 15*Sin[2*c + (5*d*x)/2] - 15*Sin[3*c + (5*d*x)/2] + 3*Sin[3*c + ( 7*d*x)/2] + 3*Sin[4*c + (7*d*x)/2]))/(192*a^2*d)
Time = 0.66 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.05, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 4304, 25, 3042, 4508, 3042, 4274, 3042, 3115, 24, 3117}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^2(c+d x)}{(a \sec (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 4304 |
\(\displaystyle -\frac {\int -\frac {\cos ^2(c+d x) (5 a-3 a \sec (c+d x))}{\sec (c+d x) a+a}dx}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {\cos ^2(c+d x) (5 a-3 a \sec (c+d x))}{\sec (c+d x) a+a}dx}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {5 a-3 a \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4508 |
\(\displaystyle \frac {\frac {\int \cos ^2(c+d x) \left (21 a^2-16 a^2 \sec (c+d x)\right )dx}{a^2}-\frac {8 \sin (c+d x) \cos (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {21 a^2-16 a^2 \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx}{a^2}-\frac {8 \sin (c+d x) \cos (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {\frac {21 a^2 \int \cos ^2(c+d x)dx-16 a^2 \int \cos (c+d x)dx}{a^2}-\frac {8 \sin (c+d x) \cos (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {21 a^2 \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-16 a^2 \int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {8 \sin (c+d x) \cos (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {\frac {21 a^2 \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-16 a^2 \int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {8 \sin (c+d x) \cos (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {21 a^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-16 a^2 \int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {8 \sin (c+d x) \cos (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {\frac {21 a^2 \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {16 a^2 \sin (c+d x)}{d}}{a^2}-\frac {8 \sin (c+d x) \cos (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos (c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
-1/3*(Cos[c + d*x]*Sin[c + d*x])/(d*(a + a*Sec[c + d*x])^2) + ((-8*Cos[c + d*x]*Sin[c + d*x])/(d*(1 + Sec[c + d*x])) + ((-16*a^2*Sin[c + d*x])/d + 2 1*a^2*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)))/a^2)/(3*a^2)
3.1.59.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_), x_Symbol] :> Simp[(-Cot[e + f*x])*(a + b*Csc[e + f*x])^m*((d*Csc [e + f*x])^n/(f*(2*m + 1))), x] + Simp[1/(a^2*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*(a*(2*m + n + 1) - b*(m + n + 1)*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] && LtQ [m, -1] && (IntegersQ[2*m, 2*n] || IntegerQ[m])
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b - a*B))*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(b*f*(2*m + 1))), x] - Simp[1/(a^2*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Cs c[e + f*x])^n*Simp[b*B*n - a*A*(2*m + n + 1) + (A*b - a*B)*(m + n + 1)*Csc[ e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B , 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0]
Time = 0.47 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.60
method | result | size |
parallelrisch | \(\frac {-163 \left (\cos \left (d x +c \right )+\frac {12 \cos \left (2 d x +2 c \right )}{163}-\frac {3 \cos \left (3 d x +3 c \right )}{163}+\frac {140}{163}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+168 d x}{48 a^{2} d}\) | \(66\) |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {-10 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+14 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(88\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {-10 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+14 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(88\) |
risch | \(\frac {7 x}{2 a^{2}}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{8 a^{2} d}+\frac {i {\mathrm e}^{i \left (d x +c \right )}}{a^{2} d}-\frac {i {\mathrm e}^{-i \left (d x +c \right )}}{a^{2} d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{8 a^{2} d}-\frac {2 i \left (12 \,{\mathrm e}^{2 i \left (d x +c \right )}+21 \,{\mathrm e}^{i \left (d x +c \right )}+11\right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}\) | \(126\) |
norman | \(\frac {\frac {7 x}{2 a}-\frac {13 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {71 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 a d}-\frac {19 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{6 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{6 a d}+\frac {7 x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a}+\frac {7 x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{2 a}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} a}\) | \(135\) |
1/48*(-163*(cos(d*x+c)+12/163*cos(2*d*x+2*c)-3/163*cos(3*d*x+3*c)+140/163) *tan(1/2*d*x+1/2*c)*sec(1/2*d*x+1/2*c)^2+168*d*x)/a^2/d
Time = 0.27 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.90 \[ \int \frac {\cos ^2(c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {21 \, d x \cos \left (d x + c\right )^{2} + 42 \, d x \cos \left (d x + c\right ) + 21 \, d x + {\left (3 \, \cos \left (d x + c\right )^{3} - 6 \, \cos \left (d x + c\right )^{2} - 43 \, \cos \left (d x + c\right ) - 32\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \]
1/6*(21*d*x*cos(d*x + c)^2 + 42*d*x*cos(d*x + c) + 21*d*x + (3*cos(d*x + c )^3 - 6*cos(d*x + c)^2 - 43*cos(d*x + c) - 32)*sin(d*x + c))/(a^2*d*cos(d* x + c)^2 + 2*a^2*d*cos(d*x + c) + a^2*d)
\[ \int \frac {\cos ^2(c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {\int \frac {\cos ^{2}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
Time = 0.36 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.49 \[ \int \frac {\cos ^2(c+d x)}{(a+a \sec (c+d x))^2} \, dx=-\frac {\frac {6 \, {\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {5 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{2} + \frac {2 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {42 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{6 \, d} \]
-1/6*(6*(3*sin(d*x + c)/(cos(d*x + c) + 1) + 5*sin(d*x + c)^3/(cos(d*x + c ) + 1)^3)/(a^2 + 2*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) + (21*sin(d*x + c)/(cos(d*x + c) + 1) - sin(d* x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 42*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2)/d
Time = 0.29 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.86 \[ \int \frac {\cos ^2(c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {\frac {21 \, {\left (d x + c\right )}}{a^{2}} - \frac {6 \, {\left (5 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a^{2}} + \frac {a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 21 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
1/6*(21*(d*x + c)/a^2 - 6*(5*tan(1/2*d*x + 1/2*c)^3 + 3*tan(1/2*d*x + 1/2* c))/((tan(1/2*d*x + 1/2*c)^2 + 1)^2*a^2) + (a^4*tan(1/2*d*x + 1/2*c)^3 - 2 1*a^4*tan(1/2*d*x + 1/2*c))/a^6)/d
Time = 13.70 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.03 \[ \int \frac {\cos ^2(c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-22\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-30\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+12\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+21\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (c+d\,x\right )}{6\,a^2\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3} \]